<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改省市区')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-tJcFlzddwCount-edit" th:object="${tJcFlzddwCount}">
            <input id="createId" name="createId" th:field="*{createId}"  type="hidden">
			<div class="form-group">	
				<label class="col-sm-3 control-label">父id：</label>
				<div class="col-sm-8">
					<input id="prentId" name="prentId" th:field="*{prentId}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">祖列表：</label>
				<div class="col-sm-8">
					<input id="ancestors" name="ancestors" th:field="*{ancestors}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">名字：</label>
				<div class="col-sm-8">
					<input id="name" name="ename" th:field="*{ename}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">顺序：</label>
				<div class="col-sm-8">
					<input id="orderNum" name="orderNum" th:field="*{orderNum}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">创建人：</label>
				<div class="col-sm-8">
					<input id="createUser" name="createUser" th:field="*{createUser}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">创建时间：</label>
				<div class="col-sm-8">
					<input id="createTime" name="createTime" th:field="*{createTime}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">修改人：</label>
				<div class="col-sm-8">
					<input id="updateUser" name="updateUser" th:field="*{updateUser}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">修改时间：</label>
				<div class="col-sm-8">
					<input id="updateTime" name="updateTime" th:field="*{updateTime}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">状态：</label>
				<div class="col-sm-8">
					<input id="status" name="status" th:field="*{status}" class="form-control" type="text">
				</div>
			</div>
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "system/tJcFlzddwCount";
		$("#form-tJcFlzddwCount-edit").validate({
			onkeyup: false,
			rules:{
				deptName:{
					remote: {
						url: prefix + "/checkDeptNameUnique",
						type: "post",
						dataType: "json",
						data: {
							"deptId": function() {
								return $("#deptId").val();
							},
							"prentId": function() {
								return $("input[name='prentId']").val();
							},
							"ename": function() {
								return $.common.trim($("#ename").val());
							}
						},
						dataFilter: function(data, type) {
							return $.validate.unique(data);
						}
					}
				},
				orderNum:{
					digits:true
				},
				email:{
					email:true,
				},
				phone:{
					isPhone:true,
				},
			},
			messages: {
				"deptName": {
					remote: "部门已经存在"
				}
			},
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-tJcFlzddwCount-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
